<template>
  <nf-form
    v-form-drag="extendFormProps"
    :model="model"
    :partModel="partModel"
    v-bind="extendFormProps"
  >
  </nf-form>
</template>

<script>
  import { reactive, defineComponent } from 'vue'
  import { nfForm } from '../../map'
  import { getItemState } from '../state-item'
  import myWatch from './controller'

  import item_date from '../json/item-time.json'

  const _temp = {
    130: `<el-time-picker
    v-model="time"
    v-bind="itemProps"
  />`,
    131: `<el-time-select
    v-model="time"
    v-bind="itemProps"
  />`
  }

  export default defineComponent({
    name: 'nf-meta-help-item-extend-time',
    inheritAttrs: false,
    components: {
      nfForm
    },
    props: {
      temp: Object // 返回模板
    },
    setup(props) {
      const state = getItemState()
        
      // 文本类扩展属性表单，需要的 meta
      const extendFormProps = reactive(item_date)
      
      const {
        setup,
        model,
        partModel,
      } = myWatch(props)

      setup(model)
      
      return {
        state,
        model,
        partModel,
        extendFormProps
      }
    }
  })

</script>